<?xml version="1.0" encoding="UTF-8"?>
<ui:composition xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html" xmlns:aui="http://liferay.com/faces/aui"
	xmlns:aui-cc="http://liferay.com/faces/aui-cc" xmlns:ice="http://www.icesoft.com/icefaces/component"
	xmlns:icecompat-cc="http://java.sun.com/jsf/composite/icecompat-cc" xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:icecore="http://www.icefaces.org/icefaces/core">

	<h:messages globalOnly="true" layout="table" />
	<aui:layout>
		<aui:column styleClass="aui-w100">
			<ice:panelGroup>
				<ice:outputConnectionStatus style="float: right;" />
				<icecompat-cc:iceInfoDataPaginator for="customers" />
				<icecompat-cc:iceNavDataPaginator for="customers" />
				<ice:commandButton actionListener="#{customersBackingBean.addNew}" value="#{i18n['add-new']}" />
				<ice:commandButton actionListener="#{customersBackingBean.deleteChecked}"
					onclick="if (! confirm('#{i18n['are-you-sure-you-want-to-delete-this']}')) {return false;}"
					value="#{i18n['delete-selected']}" />
			</ice:panelGroup>
			<ice:panelGroup>
				<ice:dataTable id="customers" columnWidths="1px,1px,100px,100px,100px"
					rows="#{customersModelBean.dataModel.rowsPerPage}" sortColumn="#{customersModelBean.dataModel.sortColumn}"
					sortAscending="#{customersModelBean.dataModel.sortAscending}" value="#{customersModelBean.dataModel}"
					var="customer">
					<ice:column>
				
						<ice:selectBooleanCheckbox value="#{customersModelBean.dataModel.rowMarks[customer]}" />
					</ice:column>
					<ice:column>
						<ice:commandButton actionListener="#{customersBackingBean.select}"
							image="#{resource['example:button-edit.png']}" value="#{customer}" />
					</ice:column>
					<ice:column>
						<f:facet name="header">
							<ice:commandSortHeader columnName="lastName">
								<h:outputText value="#{i18n['last-name']}" />
							</ice:commandSortHeader>
						</f:facet>
						<h:outputText value="#{customer.lastName}" />
					</ice:column>
					<ice:column>
						<f:facet name="header">
							<ice:commandSortHeader columnName="firstName">
								<h:outputText value="#{i18n['first-name']}" />
							</ice:commandSortHeader>
						</f:facet>
						<h:outputText value="#{customer.firstName}" />
					</ice:column>
					<ice:column>
						<f:facet name="header">
							<ice:commandSortHeader columnName="emailAddress">
								<h:outputText value="#{i18n['email-address']}" />
							</ice:commandSortHeader>
						</f:facet>
						<h:outputLink value="mailto:#{customer.emailAddress}">
							<h:outputText value="#{customer.emailAddress}" />
						</h:outputLink>
					</ice:column>
					<ice:column>
						<ice:outputText value="" />
					</ice:column>
				</ice:dataTable>
				<ice:outputText value="there-are-no-results" rendered="#{customersModelBean.dataModel.rowCount == 0}" />
			</ice:panelGroup>
		</aui:column>
	</aui:layout>

</ui:composition>
